<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue的全局组件案例1</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app1" >
        <helloworld></helloworld>
        <helloworld></helloworld>
        <helloworld></helloworld>
        <helloworld></helloworld>
    </div>
</body>
</html>
<script>
    //自定义组件
    Vue.component('helloworld',{
        template:'<div><h3>润物无声</h3> <h4>只做增强不做改变，引入它不会对现有工程产生影响，如丝般顺滑</h4></div>'
    });
    var vm = new Vue({
        el:'#app1'
    })

</script>